
import React from "react";

import './Hell.css'

export default  class Hello extends React.Component{

    state={
        name:"王五"
    }
    changeName= (e)=>{
        this.setState({
            name:e
        })
    }
    
    

    render(){
        return <div>
            名字:<span className="names">{this.state.name}</span>
            <button onClick={()=>this.changeName("大强")}>点击修改名字</button>
        </div>
    }


}